package com.linkage.lcims.base.po.enterprise;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
@SuppressWarnings("serial")
public class BVpdnTunnelPK implements Serializable {

    /** identifier field */
    private String realm;

    /** identifier field */
    private String areano;

    /** identifier field */
    private String tunnelip;

    /** full constructor */
    public BVpdnTunnelPK(String realm, String areano, String tunnelip) {
        this.realm = realm;
        this.areano = areano;
        this.tunnelip = tunnelip;
    }

    /** default constructor */
    public BVpdnTunnelPK() {
    }

    /** 
     *                @hibernate.property
     *                 column="realm"
     *                 length="40"
     *             
     */
    public String getRealm() {
        return this.realm;
    }

    public void setRealm(String realm) {
        this.realm = realm;
    }

    /** 
     *                @hibernate.property
     *                 column="areano"
     *                 length="20"
     *             
     */
    public String getAreano() {
        return this.areano;
    }

    public void setAreano(String areano) {
        this.areano = areano;
    }

    /** 
     *                @hibernate.property
     *                 column="tunnelip"
     *                 length="15"
     *             
     */
    public String getTunnelip() {
        return this.tunnelip;
    }

    public void setTunnelip(String tunnelip) {
        this.tunnelip = tunnelip;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("realm", getRealm())
            .append("areano", getAreano())
            .append("tunnelip", getTunnelip())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BVpdnTunnelPK) ) return false;
        BVpdnTunnelPK castOther = (BVpdnTunnelPK) other;
        return new EqualsBuilder()
            .append(this.getRealm(), castOther.getRealm())
            .append(this.getAreano(), castOther.getAreano())
            .append(this.getTunnelip(), castOther.getTunnelip())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getRealm())
            .append(getAreano())
            .append(getTunnelip())
            .toHashCode();
    }

}